------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  X:\shared\ambulance\Work\replicationpackage\logs\clean_ridelevel.log
  log type:  text
 opened on:  12 Jul 2024, 12:59:24

. 
. /*******************************************************************************
> clean_ridelevel.do
> 
> This code takes the ride-level claims panel and cleans it.
> *******************************************************************************/
. 
. clear all

. 
. qui {

. 
. /*Getting information on various categories of rides*/
. su ambulance_id // Referenced in Abstract and Section 1, Paragraph 2 and Section 3, Paragraph 1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
ambulance_id | 37,501,725    2.95e+07    1.23e+07          4   5.03e+07

. egen total_payments=sum(tot_pmt)

. format total_payments %12.0g

. list total_payments if _n==1 // Referenced in Abstract and Section 1, Paragraph 2 and Section 3, Paragraph 1

          +------------+
          | total_pa~s |
          |------------|
       1. | 7733447168 |
          +------------+

. codebook NPI // Referenced in Section 3, Paragraph 1

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NPI                                                                                                                                                                                                                                              (unlabeled)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                  Type: Numeric (double)

                 Range: [1.003e+09,1.993e+09]         Units: 1
         Unique values: 3,081                     Missing .: 20,890,180/37,501,725

                  Mean: 1.5e+09
             Std. dev.: 2.9e+08

           Percentiles:     10%       25%       50%       75%       90%
                        1.1e+09   1.3e+09   1.5e+09   1.8e+09   1.9e+09

. codebook usrds_id if fraud==1 // Referenced in Section 6.1, Paragraph 4

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
usrds_id                                                                                                                                                                                                                                            USRDS_ID
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                  Type: Numeric (double)

                 Range: [2150,4024236]                Units: 1
         Unique values: 6,789                     Missing .: 0/730,320

                  Mean: 2.9e+06
             Std. dev.:  638410

           Percentiles:     10%       25%       50%       75%       90%
                        2.1e+06   2.7e+06   3.1e+06   3.3e+06   3.6e+06

. 
. qui {

. 
. log close
      name:  <unnamed>
       log:  X:\shared\ambulance\Work\replicationpackage\logs\clean_ridelevel.log
  log type:  text
 closed on:  12 Jul 2024, 13:31:47
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
